#! /bin/bash
# su pi -c "exec /home/pi/loader.sh"


while true
do
    monitor=`ps -ef | grep client_mainservice.py | grep -v grep | wc -l  `
    if [ $monitor -eq 0 ]
    then
        echo "Manipulator program is not running, restart Manipulator"
	cd /home/pi/watcher_client/ && nohup python3 client_mainservice.py &
    # else
     #   echo "Manipulator program is running"
    fi
    sleep 5
done
